
import { createRouter, createWebHistory } from "vue-router";
import CompkeyShow from "@/views/CompkeyShow.vue";
import SearchView from "@/views/SearchView.vue";
import EchartView from "@/views/EchartView.vue";
import BackendView from "@/views/BackendView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: SearchView,
    },
    {
      path: "/search",
      name: "search",
      component: SearchView,
    },
    {
      path: "/result",
      name: "result",
      component: CompkeyShow,
    },
    {
      path: '/echart',
      name: 'echart',
      component: EchartView
    },
    {
      path: '/admin',
      name: 'admin',
      component: BackendView
    }
  ]
})

export default router;
